import request from "@/utils/request";

export function fetchList(query) {
  return request({
    url: "/question-bank/list",
    method: "get",
    params: query,
  });
}

export function createQuestion(data) {
  return request({
    url: "/question-bank/create",
    method: "post",
    data,
  });
}

export function updateQuestion(id, data) {
  return request({
    url: `/question-bank/update/${id}`,
    method: "put",
    data,
  });
}

export function deleteQuestion(id) {
  return request({
    url: `/question-bank/delete/${id}`,
    method: "delete",
  });
}

export function batchDeleteQuestions(ids) {
  return request({
    url: "/question-bank/batch-delete",
    method: "post",
    data: { ids },
  });
}
